package com.yy.service;

import cn.hutool.core.date.DateUtil;
import com.yy.clientEntities.TestData;
import com.yy.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.concurrent.TimeUnit;

/**
 * Author young
 * Date 2023/1/12 9:18
 * Description: SpringCloudAlibaba
 */
@FeignClient(value = "cloudalibaba-sentinel-service")
public interface SentinelService {
    @PutMapping("/sentinel/add")
    public Result<String> add(@RequestBody TestData testData);
    
    @DeleteMapping("/sentinel/delete/{id}")
    public Result<String> delete(@PathVariable("id")Integer id);
    
    @PostMapping("/sentinel/update")
    public Result<TestData> update(@RequestBody TestData testData);
    
    @GetMapping("/sentinel/find/{id}")
    public Result<TestData> findOne(@PathVariable("id")Integer id);
    
    @GetMapping("/sentinel/all")
    public Result<Collection<TestData>> all();
}
